﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Vote.DataEntity;
using System.Web;
using Vote.Database.DataAccess;

namespace Vote.Business
{
    /// <summary>
    /// 用户
    /// </summary>
    public class AdminUserModel
    {

        private AdminUserModel(){ }

        private static AdminUserModel _instance = new AdminUserModel();

        public static AdminUserModel Instance { get { return _instance; } }


        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        public AdminUserDataEntity Login(String username, String password)
        {
            AdminUserDataEntity result = new AdminUserAccess().Login(username, password);
            return result;
        }

        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="admin"></param>
        /// <returns></returns>
        public Boolean EditAdminuser(AdminUserDataEntity admin)
        {
            Boolean result = new AdminUserAccess().EditAdminuser(admin);
            return result;
        }
    }
}
